package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingLevel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingLevelMapper {

    // @Select("select nursing_level.*,nick_name as creator,plan_name from nursing_level left join sys_user on nursing_level.create_by = sys_user.id left join nursing_plan on nursing_level.lplan_id = nursing_plan.id;")
    // @Results({
    //         @Result(property = "planId", column = "lplan_id"),
    // })
    List<NursingLevel> listAll();

    void add(NursingLevel nursingLevel);

    Page<NursingLevel> getByPage(String name, Integer status);

    NursingLevel getById(Long id);

    void update(NursingLevel nursingLevel);

    void deleteById(Long id);

    void updateStatus(Long id, Integer status);
}
